Skip to content

Conversation

@Caball009
Copy link

@Caball009 Caball009 commented Dec 25, 2025

Currently, each TemplateThing gets assigned a unique ID, but the ID is not reset after each map. This can cause mismatches when playing a multiplayer match after having loaded a custom map or custom shellmap that generates TemplateThings.

TODO:

  • Need to check if relying on the hash map size is possible with STLport.
    std::hash_map::resize is the equivalent to std::unordered_map::reserve, so that's not an issue here.
  • Replicate in Generals

@Caball009 Caball009 added Bug Something is not working right, typically is user facing Major Severity: Minor < Major < Critical < Blocker Stability Concerns stability of the runtime labels Dec 25, 2025
@Caball009 Caball009 marked this pull request as ready for review December 25, 2025 23:50
@Caball009 Caball009 changed the title bugfix(ThingFactory): Reset ThingTemplate ID for each match to avoid mismatches after playing custom maps bugfix(ThingFactory): Reset ThingTemplate ID for each match to avoid mismatches after loading a custom map Dec 25, 2025
Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find. Issue description is logical.

@xezon xezon changed the title bugfix(ThingFactory): Reset ThingTemplate ID for each match to avoid mismatches after loading a custom map bugfix(thingfactory): Reset next ThingTemplate ID after clearing custom map template overrides to avoid mismatches in the next multiplayer game session Jan 2, 2026
@xezon xezon changed the title bugfix(thingfactory): Reset next ThingTemplate ID after clearing custom map template overrides to avoid mismatches in the next multiplayer game session bugfix(thingfactory): Reset next ThingTemplate ID after clearing custom map template overrides to avoid CRC mismatch in the next multiplayer game session Jan 2, 2026
@xezon xezon added this to the Major bug fixes milestone Jan 2, 2026
Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be replicated in Generals.

@Caball009
Copy link
Author

Replicated in Generals.

@xezon xezon merged commit 409fed2 into TheSuperHackers:main Jan 3, 2026
24 checks passed
@Caball009 Caball009 deleted the fix_mismatch_thingtemplate_id branch January 3, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing Major Severity: Minor < Major < Critical < Blocker Stability Concerns stability of the runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mismatch in ThingTemplate ID after playing a map with map.ini with custom objects

2 participants